import request from '@/utils/request'

// 查询作业班组列表
export function listWorkTeam(query) {
  return request({
    url: '/workTeam/workTeam/list',
    method: 'get',
    params: query
  })
}

// 查询作业班组详细
export function getWorkTeam(id) {
  return request({
    url: '/workTeam/workTeam/' + id,
    method: 'get'
  })
}

// 新增作业班组
export function addWorkTeam(data) {
  return request({
    url: '/workTeam/workTeam',
    method: 'post',
    data: data
  })
}

// 修改作业班组
export function updateWorkTeam(data) {
  return request({
    url: '/workTeam/workTeam',
    method: 'put',
    data: data
  })
}

// 删除作业班组
export function delWorkTeam(id) {
  return request({
    url: '/workTeam/workTeam/' + id,
    method: 'delete'
  })
}

// 查询班组类型
export function listWorkTeamCategory() {
  return request({
    url: '/train/WorkTeamCategory/choice',
    method: 'get'
  })
}
